FROM java:8
VOLUME /tmp
#把当前项目下cloud-eureka-server7001-1.0-SNAPSHOT.jar改名为test.jar 添加到镜像中
ADD cloud-eureka-server7001-1.0-SNAPSHOT.jar app.jar
CMD ["--server.port=7001"]
#指定端口,最好写与项目配置的端口
EXPOSE 7001
#在镜像中运行/test.jar包,这样在运行镜像的时候就已经启动好了test.jar
ENTRYPOINT ["java","-Xms256m","-Xmx256m","-jar","/app.jar"]






